<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="main.org.form.action.Forms, main.org.model.*, org.compiere.model.*, org.compiere.util.Env" %>

<%
	Forms fb = (Forms) session.getAttribute("forms"); 
	MBPMForm[] forms = fb.getFormsLine();
	String subsName = fb.getOrg().getName();
%>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Бюджетные формы ввода</title>
		<link rel="shortcut icon" href="images/logo.png" type="image/jpg" /> 	
		<link type="text/css" href="css/Main.css" rel="stylesheet">
		<script type="text/javascript">
			var projectID = <%= fb.getDefaultProjectID() %>;
		</script>
	</head>
	<body>
		<div>
			<table width="80%" cellspacing="2" align="center">
				<tr>
					<td scope="col">
					   	<font color="#321818" style="font-family: sans-serif; font-style:italic" size="+2">Бюджетные формы ввода</font>
					   	<br/>&nbsp;
					</td>
				 </tr>
			</table>
			
			<%@ include file="/jsp/budgetcall/PropertyForm.jsp" %>
			
	 		<table class="cursorHover more" width="40%" border="1" style="margin-top:20px;" bordercolor="#663300" cellspacing="2" align="center">
				<tr class="trLightBlue">
					<th width="20%">Форма</th>
					<th width="20%">Наименование настроек</th>
				</tr>
				<%
				int count = 1;
				for(MBPMForm f: forms){ %>
				<tr>
					<td><font color="#321818" style="font-family: sans-serif; font-style:italic" size="+1"><%= f.getBPM_FormCode().getName() %></font></td>
					<td style="text-align: left; padding-left: 10px;">
						<s:set var="defaultProjectID"><%= fb.getDefaultProjectID() %></s:set>
						<a href="<s:url action='formBP'>
							<s:param name="formID"><%= f.getBPM_Form_ID() %></s:param>
							<s:param name="formCodeID"><%= f.getBPM_FormCode_ID() %></s:param>
							<s:param name="orgID"><%= fb.getAD_Org_ID() %></s:param>
							<s:param name="projectID">%{#defaultProjectID}</s:param>
							</s:url>"><font style="font-family: sans-serif; font-style:italic" size="2"><%= f.getName() %></font></a>
					</td>
				</tr>
				<%
				count++;
				}
				%>
			</table>
		</div>
	</body>
</html>